#include<stdio.h>
#include<string.h> 
int main()
{
	char s[50]="";
	gets(s);
	int i;
	char item;
	int j=strlen(s);
	for(i=0;i<j;i++)
	{
		if(s[i]>='a'&&s[i]<='z')
		{
			s[i]=(s[i]+26+3-'a')%26+'a'; 
		}
		else if(s[i]>='A'&&s[i]<='Z')
		{
			s[i]=(s[i]+26+3-'A')%26+'A';
		}
		else
			return 0;
	}
	for(i=0;i<j/2;i++)
	{
		item=s[i];
		s[i]=s[j-1-i];
		s[j-1-i]=item;
	}
	for(i=0;i<j;i++)
	{
		if(s[i]>='a'&&s[i]<='z')
		{
			s[i]=s[i]-32;
		}
		else if(s[i]>='A'&&s[i]<='Z')
		{
			s[i]=s[i]+32;
		}
	}
	puts(s);
	return 0;
 } 
